package com.xian.im.common.model.from;


import com.xian.im.common.validator.group.AddGroup;
import com.xian.im.common.validator.group.CheckGroup;
import com.xian.im.common.validator.group.Group;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @program: xian-code
 * @description:
 * @author: liru.xian
 * @create: 2021-01-20 03:24
 **/
@Data
@ApiModel(value = "机构接收请求实体")
public class OrganizationFrom implements Serializable {

    @ApiModelProperty("组织名称")
    @NotBlank(groups = {AddGroup.class},message = "组织名称 不能为空")
    private String name;
    @ApiModelProperty("组织唯一code")
    @NotBlank(groups = {CheckGroup.class, Group.class},message = "组织唯一uniqueId 不能为空")
    private String uniqueId;
    @ApiModelProperty("回调地址")
    @NotBlank(groups = {AddGroup.class},message = "回调地址 不能为空")
    private String callbackUrl;
    @ApiModelProperty("回调类型 默认0 http 1 MQ")
    @NotNull(groups = AddGroup.class,message = "回调类型 不能为空")
    private Integer callbackType;
    @ApiModelProperty("租户状态 默认0 正常 1 停用")
    @NotNull(groups = CheckGroup.class,message = "租户状态不能为空")
    private Integer status;

}
